import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import StartRoutes from "@/views/start/route"
import ErrorsRoutes from "@/views/errors/route"
import MainRoutes from "@/views/main/route"

const routes = [{
        path: "",
        redirect: "/login"
    },
    ...StartRoutes,
    ...MainRoutes,
    ...ErrorsRoutes,
    {
        path: "/:pathMatch(.*)",
        redirect: {
            name: "notfound"
        }
    }
]

const router = createRouter({
    history: createWebHashHistory(process.env.BASE_URL),
    routes
})

export default router